home *** CD-ROM | disk | FTP | other *** search
/ Language/OS - Multiplatform Resource Library / LANGUAGE OS.iso / oper_sys / kerberos / pc / krb_src.lha / KUSER / ENVPKG.ASM < prev    next >
Encoding:
Assembly Source File  |  1991-07-17  |  739 b   |  45 lines

  1. ; ENVPKG.ASM - Jim Kyle - July 1990
  2.  
  3. .model small,c
  4.  
  5. .data
  6.     extrn _psp:word
  7.  
  8. .code
  9.  
  10. mstenvp proc
  11.     public mstenvp
  12. ;char far * mstenvp(void);
  13.     mov ax,352eh;
  14.     int 21h;
  15.     mov dx,es:[002ch];
  16.     xor ax,ax;
  17.     ret
  18. mstenvp endp
  19.  
  20. envsiz proc oenv:word, senv:word
  21.     public envsiz 
  22. ; short envsiz(char far*vptr)
  23.     mov ax,senv;    segment of environment
  24.     dec ax;            back up to mcb
  25.     mov es,ax
  26.     mov ax,es:[0003h];    size in paragraphs
  27.     ret;
  28. envsiz endp
  29.  
  30. nxtevar proc uses di, vptr:far ptr byte
  31.     public nxtevar
  32. ; char far * nxtevar(char far *vptr)
  33.     les di,vptr;
  34.     mov cx,8000h;
  35.     xor ax,ax;
  36.     mov dx,ax;
  37. repne scasb;    search for 0
  38.     inc cx;        CX=8000h if only one 0 found
  39.     js nev
  40.     mov dx,es
  41.     mov ax,di
  42. nev:
  43.     ret
  44. nxtevar endp
  45.     end